home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / COMAL / B-Book Series / (k)b6.d64 / day'of'year.l < prev    next >
Text File  |  2007-02-28  |  233b  |  10 lines

  1. 9000 FUNC DAY'OF'YEAR(MONTH,DAY,YEAR) CLOSED
  2. 9010 DOY:=DAY+(MONTH-1)*30+INT((MONTH+1)*.61)-2
  3. 9020 IF MONTH<=2 THEN
  4. 9030 DOY:+MONTH
  5. 9040 ELIF NOT LEAP'YEAR(YEAR) THEN
  6. 9050 DOY:-1
  7. 9060 ENDIF 
  8. 9070 RETURN (DOY)
  9. 9080 ENDFUNC DAY'OF'YEAR
  10.